<!DOCTYPE html>
<html lang="zh-cn">

        <head>
                <meta charset="utf-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <title>{:C('site.sitename')}管理系统</title>
                <meta name="Keywords" content="{:C('site.sitename')}"/> 
                <!-- bootstrap - css -->
                <link href="__ADMIN__BJUI/themes/css/bootstrap.min.css" rel="stylesheet">
                <!-- core - css -->
                <link href="__ADMIN__BJUI/themes/css/style.css" rel="stylesheet">
                <link href="__ADMIN__BJUI/themes/blue/core.css" id="bjui-link-theme" rel="stylesheet">
                <!-- plug - css -->
                <link href="__ADMIN__kindeditor/themes/default/default.css" rel="stylesheet">
                <link href="__ADMIN__BJUI/plugins/colorpicker/css/bootstrap-colorpicker.min.css" rel="stylesheet">
                <link href="__ADMIN__BJUI/plugins/niceValidator/jquery.validator.css" rel="stylesheet">
                <link href="__ADMIN__BJUI/plugins/bootstrapSelect/bootstrap-select.css" rel="stylesheet">
                <link href="__ADMIN__BJUI/themes/css/FA/css/font-awesome.min.css" rel="stylesheet">
                <style type="text/css">
                        tr{height: 32px; line-height: 32px} /* 优化表格行高 */
                        .resize-head{height:0;} /* 修正表格行距增加后表头显示问题 */
                        .panel-body td{line-height:1.5;font-size: 14px;} /* kindEditor文字行距 */
                        .panel-body p{line-height:1.5;font-size: 14px;} /* kindEditor文字行距 */
                </style>
                <!--[if lte IE 7]>
                <link href="__ADMIN__BJUI/themes/css/ie7.css" rel="stylesheet">
                <![endif]-->
                <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
                <!--[if lte IE 9]>
                    <script src="__ADMIN__BJUI/other/html5shiv.min.js"></script>
                    <script src="__ADMIN__BJUI/other/respond.min.js"></script>
                <![endif]-->
                <!-- jquery -->
                <script src="__ADMIN__BJUI/js/jquery-1.7.2.min.js"></script>
                <script src="__ADMIN__BJUI/js/jquery.cookie.js"></script>
                <!--[if lte IE 9]>
                <script src="__ADMIN__BJUI/other/jquery.iframe-transport.js"></script>    
                <![endif]-->
                <!-- BJUI.all 分模块压缩版 -->
                <!--<script src="__ADMIN__BJUI/js/bjui-all.js"></script> -->
                <!--以下是B-JUI的分模块未压缩版，建议开发调试阶段使用下面的版本 -->
                <script src="__ADMIN__BJUI/js/bjui-core.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-regional.zh-CN.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-frag.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-extends.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-basedrag.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-slidebar.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-contextmenu.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-navtab.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-dialog.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-taskbar.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-ajax.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-alertmsg.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-pagination.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-util.date.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-datepicker.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-ajaxtab.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-tablefixed.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-tabledit.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-spinner.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-lookup.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-tags.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-upload.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-theme.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-initui.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-plugins.js"></script>
                <!-- plugins -->
                <!-- swfupload for uploadify && kindeditor -->
                <script src="__ADMIN__BJUI/plugins/swfupload/swfupload.js"></script>
                <!-- kindeditor -->
                <script src="__ADMIN__kindeditor/kindeditor-all.js"></script>
                <script src="__ADMIN__kindeditor/lang/zh_CN.js"></script>
                <!-- colorpicker -->
                <script src="__ADMIN__BJUI/plugins/colorpicker/js/bootstrap-colorpicker.min.js"></script>
                <!-- ztree -->
                <script src="__ADMIN__BJUI/plugins/ztree/jquery.ztree.all-3.5.js"></script>
                <!-- nice validate -->
                <script src="__ADMIN__BJUI/plugins/niceValidator/jquery.validator.js"></script>
                <script src="__ADMIN__BJUI/plugins/niceValidator/jquery.validator.themes.js"></script>
                <!-- bootstrap plugins -->
                <script src="__ADMIN__BJUI/plugins/bootstrap.min.js"></script>
                <script src="__ADMIN__BJUI/plugins/bootstrapSelect/bootstrap-select.min.js"></script>
                <!-- icheck -->
                <script src="__ADMIN__BJUI/plugins/icheck/icheck.min.js"></script>
                <!-- dragsort -->
                <script src="__ADMIN__BJUI/plugins/dragsort/jquery.dragsort-0.5.1.min.js"></script>
                <!-- highcharts -->
                <script src="__ADMIN__BJUI/plugins/highcharts/highcharts.js"></script>
                <script src="__ADMIN__BJUI/plugins/highcharts/highcharts-3d.js"></script>
                <!-- ECharts -->
                <script src="__ADMIN__BJUI/plugins/echarts/echarts.js"></script>
                <!-- other plugins -->
                <script src="__ADMIN__BJUI/plugins/other/jquery.autosize.js"></script>
                <link href="__ADMIN__BJUI/plugins/uploadify/css/uploadify.css" rel="stylesheet">
                <script src="__ADMIN__BJUI/plugins/uploadify/scripts/jquery.uploadify.min.js"></script>
                <script src="__ADMIN__theme/js/functions.js"></script>
                <script src="__ADMIN__theme/js/template.min.js" type="text/javascript"></script>
                <script src="__ADMIN__theme/js/template-syntax.js" type="text/javascript"></script>
                <!-- init -->
                <script type="text/javascript">
                        $(function() {
                                BJUI.init({
                                        JSPATH: '__ADMIN__BJUI/',
                                        PLUGINPATH: '__ADMIN__BJUI/plugins/',
                                        //加空格取消tp自动生成
                                        loginInfo: {title: '登录', url: "{:U('Login/login_dialog')}", width: 400, height: 200}, // 会话超时后弹出登录对话框
                                        statusCode: {ok: 200, error: 300, timeout: 301}, //[可选]
                                        ajaxTimeout: 10000, //[可选]全局Ajax请求超时时间(毫秒)
                                        alertTimeout: 3000, //[可选]信息提示[info/correct]自动关闭延时(毫秒)
                                        pageInfo: {pageCurrent: 'pageCurrent', pageSize: 'pageSize', orderField: 'orderField', orderDirection: 'orderDirection'}, //[可选]分页参数
                                        keys: {statusCode: 'statusCode', message: 'message'}, //[可选]
                                        ui: {showSlidebar: true, clientPaging: true}, //[可选]clientPaging:在客户端响应分页及排序参数
                                        debug: true, // [可选]调试模式 [true|false，默认false]
                                        theme: 'blue' // 若有Cookie['bjui_theme'],优先选择Cookie['bjui_theme']。皮肤[五种皮肤:default, orange, purple, blue, red, green]
                                })
                                //时钟
                                var today = new Date(), time = today.getTime()
                                $('#bjui-date').html(today.formatDate('yyyy/MM/dd'))
                                setInterval(function() {
                                        today = new Date(today.setSeconds(today.getSeconds() + 1))
                                        $('#bjui-clock').html(today.formatDate('HH:mm:ss'))
                                }, 1000)
                        })

                        //console.log('IE:'+ (!$.support.leadingWhitespace))
                        //菜单-事件
                        function MainMenuClick(event, treeId, treeNode) {
                                if (treeNode.isParent) {
                                        var zTree = $.fn.zTree.getZTreeObj(treeId)

                                        zTree.expandNode(treeNode)
                                        return
                                }

                                if (treeNode.target && treeNode.target === 'dialog')
                                        $(event.target).dialog({id: treeNode.tabid, url: treeNode.url, title: treeNode.name})
                                else
                                        $(event.target).navtab({id: treeNode.tabid, url: treeNode.url, title: treeNode.name, fresh: treeNode.fresh, external: treeNode.external})
                                event.preventDefault()
                        }
                </script>
                <script type="text/javascript">
                        //选择事件
                        function S_NodeCheck(e, treeId, treeNode) {
                                var zTree = $.fn.zTree.getZTreeObj(treeId),
                                        nodes = zTree.getCheckedNodes(true)
                                var ids = '', names = ''

                                for (var i = 0; i < nodes.length; i++) {
                                        ids += ',' + nodes[i].id
                                        names += ',' + nodes[i].name
                                }
                                if (ids.length > 0) {
                                        ids = ids.substr(1), names = names.substr(1)
                                }
                                var newsub = treeId.split('j_select_tree_')
                                var $from = $('#j_ztree_menus_' + newsub[1])
                                var $from1 = $('#j_ztree_names_' + newsub[1])

                                if ($from && $from.length)
                                        $from.val(ids)
                                if ($from1 && $from1.length)
                                        $from1.val(names)
                        }
                        //单击事件
                        function S_NodeClick(event, treeId, treeNode) {
                                var zTree = $.fn.zTree.getZTreeObj(treeId)

                                zTree.checkNode(treeNode, !treeNode.checked, true, true)

                                event.preventDefault()
                        }
                        //带回事件
                        function S_NodeClickBringBack(e, treeId, treeNode) {
                                var zTree = $.fn.zTree.getZTreeObj(treeId),
                                        nodes = zTree.getCheckedNodes(true)
                                var ids = '', names = ''

                                for (var i = 0; i < nodes.length; i++) {
                                        ids += ',' + nodes[i].id
                                        names += ',' + nodes[i].name
                                }
                                if (ids.length > 0) {
                                        ids = ids.substr(1), names = names.substr(1)
                                }
                                var $this = $(this)
                                //回调函数 By胡小奇 智商的象征
                                $.fn.lookup.call($this, 'setSingle', {id: ids, name: names}, 0)
                                e.preventDefault()

                        }
                        function InsertTag(str, id) {
                                var ubb = document.getElementById(id);
                                var ubbLength = ubb.value.length;
                                ubb.focus();
                                if (typeof document.selection !== "undefined") {
                                        document.selection.createRange().text = str;
                                } else {
                                        ubb.value = ubb.value.substr(0, ubb.selectionStart) + str + ubb.value.substring(ubb.selectionStart, ubbLength);
                                }
                        }

                </script>
        </head>

        <body >
                <header id="bjui-header" >
                        <div class="bjui-navbar-header" >
                                <button type="button" class="bjui-navbar-toggle btn-default" data-toggle="collapse" data-target="#bjui-navbar-collapse">
                                        <i class="fa fa-bars"></i>
                                </button>
                                <a class="bjui-navbar-logo" href="{:U('index')}" style='font-size:18px; line-height: 35px; margin-left: 20px; font-weight:bold;color:#FFF;'>红薯橱柜网</a>
                        </div>
                        <nav id="bjui-navbar-collapse">
                                <ul class="bjui-navbar-right">
                                        <li class="datetime"><div><span id="bjui-date"></span><br><i class="fa fa-clock-o"></i> <span id="bjui-clock"></span></div></li>
                                        <li><a href="{:C('site.siteurl')}" target="_blank">网站首页</a></li>
                                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">欢迎你，{:session('mname')} <span class="caret"></span></a>
                                                <ul class="dropdown-menu" role="menu">
                                                        <li><a href="{:U('Pub/cache')}" data-toggle="dialog" data-id="dialog-mask" data-width="400" data-mask="true" data-height="260">&nbsp;<span class="fa fa-trash"></span> 清理缓存</a></li>
                                                        <li class="divider"></li>
                                                        <li style="height:30px;"><a href="{:U('Login/loginout')}" class="red">&nbsp;<span class="fa fa-power-off"></span> 注销登陆</a></li>
                                                </ul>
                                        </li>
                                        <li class="dropdown"><a href="#" class="dropdown-toggle theme default" data-toggle="dropdown"><i class="fa fa-tree"></i></a>
                                                <ul class="dropdown-menu" role="menu" id="bjui-themes">
                                                        <li ><a href="javascript:;" class="theme_default" data-toggle="theme" data-theme="default">&nbsp;<i class="fa fa-tree"></i> 黑白分明&nbsp;&nbsp;</a></li>
                                                        <li><a href="javascript:;" class="theme_orange" data-toggle="theme" data-theme="orange">&nbsp;<i class="fa fa-tree"></i> 橘子红了</a></li>
                                                        <li><a href="javascript:;" class="theme_purple" data-toggle="theme" data-theme="purple">&nbsp;<i class="fa fa-tree"></i> 紫罗兰</a></li>
                                                        <li class="active"><a href="javascript:;" class="theme_blue" data-toggle="theme" data-theme="blue">&nbsp;<i class="fa fa-tree"></i> 青出于蓝</a></li>
                                                        <li><a href="javascript:;" class="theme_red" data-toggle="theme" data-theme="red">&nbsp;<i class="fa fa-tree"></i> 红红火火</a></li>
                                                        <li><a href="javascript:;" class="theme_green" data-toggle="theme" data-theme="green">&nbsp;<i class="fa fa-tree"></i> 绿草如茵</a></li>
                                                </ul>
                                        </li>
                                </ul>
                        </nav>

                </header>
                <div id="bjui-container" class="clearfix">
                        <!--左边栏 -->
                        <div id="bjui-leftside">
                                <div id="bjui-sidebar-s">
                                        <div class="collapse">
                                                <div class="toggleCollapse"><div></div></div>
                                        </div>
                                </div>

                                <div id="bjui-sidebar">
                                        <div class="toggleCollapse">
                                                <h2><i class="fa fa-bars"></i> 
                                                        导航栏 
                                                        <i class="fa fa-bars"></i>
                                                </h2><a href="javascript:;" class="lock"><i class="fa fa-lock"></i></a>
                                        </div>
                                        <div class="panel-group panel-main" data-toggle="accordion" id="bjui-accordionmenu" data-heightbox="#bjui-sidebar" data-offsety="26">
                                                {volist name='menu' id='vo'}
                                                <div class="panel panel-default">
                                                        <div class="panel-heading panelContent">
                                                                <h4 class="panel-title">
                                                                        <a data-toggle="collapse" data-parent="#bjui-accordionmenu" href="#bjui-collapse{$key}" class="active">
                                                                                <i class="fa fa-caret-square-o-down"></i>
                                                                                {$vo[0]['group']|default=''}
                                                                        </a>
                                                                </h4>
                                                        </div>
                                                        <div id="bjui-collapse{$key}" class="panel-collapse panelContent collapse {eq name='key' value='0'} in {/eq}">
                                                                <div class="panel-body" >                                                                        
                                                                        <ul id="bjui-tree{$key}" class="ztree ztree_main" data-toggle="ztree" data-on-click="MainMenuClick"  {eq name='key' value='0'} data-expand-all="true"{else /} data-expand-all="false"{/eq}>
                                                                            {foreach name="menu[$key]" item="v2" key="k" }
                                                                            <li data-id="{$v2['id']}" data-pid="{$v2['pid']}"  data-tabid="{$v2['name']}" data-url="{:U($v2['name'])}" data-fresh="true" data-reloadWarn="true">{$v2['title']}</li>
                                                                                {/foreach}

                                                                        </ul>
                                                                </div>
                                                        </div>
                                                        <div class="panelFooter">
                                                                <div class="panelFooterContent"></div>
                                                        </div>
                                                </div>
                                                {/volist}

                                        </div>

                                </div>
                        </div>
                        <div id="bjui-navtab" class="tabsPage">
                                <div class="tabsPageHeader">
                                        <div class="tabsPageHeaderContent">
                                                <ul class="navtab-tab nav nav-tabs">
                                                        <li data-tabid="main" class="main active"><a href="javascript:;"><span><i class="fa fa-home"></i> #maintab#</span></a></li>
                                                </ul>
                                        </div>
                                        <div class="tabsLeft"><i class="fa fa-angle-double-left"></i></div>
                                        <div class="tabsRight"><i class="fa fa-angle-double-right"></i></div>
                                        <div class="tabsMore"><i class="fa fa-angle-double-down"></i></div>
                                </div>
                                <ul class="tabsMoreList">
                                        <li><a href="javascript:;">#maintab#</a></li>
                                </ul>
                                <div class="navtab-panel tabsPageContent layoutBox">
                                        <div class="page unitBox">
                                                <div class="bjui-pageHeader" style="background:#FFF;">
                                                        <div style="padding: 0 5px; border-bottom: 1px #DDD solid;">
                                                                <h4>{:C('site.sitename')}</h4>
                                                                <hr style="margin: 12px 0 0px;">
                                                                <div class="row">
                                                                        <div class="col-md-4">
                                                                                <h5>{:C('site.sitename')}管理系统</h5>
                                                                                <h5 style='font-weight: bold;'>欢迎你：<a style='color:#FF6600; font-weight: bold;'>{:session('mname')}</a></h5>
                                                                        </div>
                                                                        <div class="col-md-4">                                                                                
                                                                                <h5>请使用IE7版本以上的浏览器</h5>
                                                                                <h5>使用Chrome或360极速模式打开最佳{:C('hostname')}</h5>
                                                                        </div>
                                                                        <div class="col-md-4">
                                                                        </div>
                                                                </div>
                                                        </div>
                                                </div>
                                                <div class="bjui-pageFormContent" data-layout-h="0">
                                                        <div style="position: absolute;top:10px;right:0;width:300px;">

                                                        </div>
                                                        <div style="overflow: hidden;">
                                                                <div class="row" style="padding: 0 8px;">
                                                                        <div class="col-md-12" style="width:100%;">
                                                                                <div class="panel panel-default">
                                                                                        <div class="panel-heading"><h3 class="panel-title">网站信息：</h3></div>
                                                                                        <div class="panel-body bjui-doc" style="padding:0;">
                                                                                                <table class="table-bordered" width="100%">
                                                                                                        <tr>
                                                                                                                <th align='center'>橱柜总数</th>
                                                                                                                <th align='center'>订单总数</th>
                                                                                                                <th align='center'>咨询总数</th>
                                                                                                                <th align='center'>文章总数</th>
                                                                                                        </tr>
                                                                                                        <tr style="font-size:13px; color: #FF6600;">
                                                                                                                <td align="center">{$lineCount|default='0'}</td>
                                                                                                                <td align="center">{$orderCount|default='0'}</td>
                                                                                                                <td align="center">{$zixunCount|default='0'}</td>
                                                                                                                <td align="center">{$newsCount|default='0'}</td>
                                                                                                        </tr>

                                                                                                </table>
                                                                                        </div>
                                                                                </div>
                                                                        </div>
                                                                        <div class="col-md-12" style="width:50%;">
                                                                                <div class="panel panel-default">
                                                                                        <div class="panel-heading"><h3 class="panel-title">最近咨询：</h3></div>
                                                                                        <div class="panel-body bjui-doc" style="padding:0;">
                                                                                                <table class="table-bordered" width="100%">
                                                                                                        <tr>
                                                                                                                <th width="80" align="center">咨询橱柜ID</th>
                                                                                                                <th align="center">咨询内容</th>
                                                                                                                <th width="80" align="center">处理结果</th>
                                                                                                                <th width="50" align="center">操作</th>
                                                                                                        </tr> 
                                                                                                        {notempty name="newZixun"} 
                                                                                                        {volist name="newZixun" id="vo"}
                                                                                                        <tr>
                                                                                                        <td align="center">{$vo.tours_id}</td>
                                                                                                        <td align='center' class="fontInd">{$vo.content|msubstr=15}......</td>
                                                                                                        <td align="center">{empty name="vo.reply"}<font style="color:red;">未处理</font>{else /}<font style='color:green;'>已处理</font>{/empty}</td>
                                                                                                        <td align="center">
                                                                                                                <a href="{:U('Sales/zixun_reply?id='.$vo['id'])}" class="btn btn-green" data-height="400" data-toggle="dialog" data-mask='true' data-id="dialog-mask" data-title="回复" data-icon='reply'></a>
                                                                                                        </td>
                                                                                                        </tr>
                                                                                                        {/volist}
                                                                                                        {else /}
                                                                                                        <tr><td colspan="4" align="center">暂无询单</td></tr>
                                                                                                        {/notempty}

                                                                                                </table>
                                                                                        </div>
                                                                                </div>
                                                                        </div>
                                                                        <div class="col-md-12" style="width:50%;">
                                                                                <div class="panel panel-default">
                                                                                        <div class="panel-heading"><h3 class="panel-title">最新订单：</h3></div>
                                                                                        <div class="panel-body bjui-doc" style="padding:0;">
                                                                                                <table class="table-bordered" width="100%">
                                                                                                        <tr>
                                                                                                                <th align="center">预订橱柜</th>
                                                                                                                <th width="100" align="center">联系人</th>
                                                                                                                <th width="80" align="center">状态</th>
                                                                                                                <th width="50" align="center">操作</th>
                                                                                                        </tr> 
                                                                                                        {notempty name="newOrder"} 
                                                                                                        {volist name="newOrder" id="vo"}
                                                                                                        <tr>
                                                                                                                <td class="fontInd" align='center'><a href='{$vo.tours_url}' target='_blank'>{$vo.tours_title|msubstr=20}......</a></td>
                                                                                                                <td align="center">{$vo.username|default=''}</td>
                                                                                                                {switch name="vo.status"}
                                                                                                                {case value="0"}<td align="center" style="color:#F60;">新订单</td>{/case}
                                                                                                                {case value="1"}<td align="center" style="color:#390;">已受理</td>{/case}
                                                                                                                {case value="2"}<td align="center" style="color:#F00;">待支付</td>{/case}
                                                                                                                {case value="3"}<td align="center" style="color:#06F;">已支付</td>{/case}
                                                                                                                {case value="4"}<td align="center" style="color:#000;">已完成</td>{/case}
                                                                                                                {case value="5"}<td align="center" style="color:#999;">已取消</td>{/case}
                                                                                                                {/switch}
                                                                                                                <td align="center">
                                                                                                                        <a  href="{:U('Sales/order_detail?orderid='.$vo['order_id'])}" class="btn btn-green" data-height="600"  data-width="700" data-toggle="dialog" data-mask='true' data-id="dialog-mask" data-title="产看详情" data-icon="search"></a>
                                                                                                                </td>

                                                                                                        </tr>
                                                                                                        {/volist}
                                                                                                        {else /}
                                                                                                        <tr><td colspan="4" align="center">暂无橱柜订单</td></tr>
                                                                                                        {/notempty}
                                                                                                </table>  
                                                                                        </div>
                                                                                </div>
                                                                        </div>
                                                                </div>
                                                        </div>
                                                </div>
                                        </div>
                                </div>
                        </div>
                </div>
                <div id="bjui-footer">Copyright &copy; 2016  <a href="{:C('site.siteurl')}" target="_blank">红薯橱柜</a></div>
        </body>
</html>
